/**
 * 
 */
package cn.ad.server.web.spring.model;

import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 广告请求类
 * 用于描述AdServer系统中所有广告请求，无论是私有的资源接入还是共有资源ADX接入，所有的广告请求都必须继承此抽象类
 * @author Administrator
 */
public abstract class AdRequest implements IAdserverRequest{
	
	/**
	 * 请求起始时间戳
	 * 初始化为当前系统时间
	 */
	private long requestTimestamp = System.currentTimeMillis();;
	
	/**
	 * 渠道标识
	 */
	private String channelID;
	
	/**
	 * DSP广告主标识
	 */
	private String avid;
	
	/**
	 * @return the channelID
	 */
	public String getChannelID() {
		return channelID;
	}

	/**
	 * @param channelID the channelID to set
	 */
	public void setChannelID(String channelID) {
		this.channelID = channelID;
	}

	/**
	 * @return the requestTimestamp
	 */
	public long getRequestTimestamp() {
		return requestTimestamp;
	}

	/**
	 * @param requestTimestamp the requestTimestamp to set
	 */
	public void setRequestTimestamp(long requestTimestamp) {
		this.requestTimestamp = requestTimestamp;
	}

	/* (non-Javadoc)
	 * @see cn.falconnect.adserver.adapter.IAdserverRequest#getTransactionID()
	 */
	@Override
	public String getTransactionID() {
		// TODO 用于后期扩展完善
		return null;
	}

	public String getAvid() {
		return avid;
	}

	public void setAvid(String avid) {
		this.avid = avid;
	}
	
	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
	
}
